projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
11b3efb
)
css: Don't start transitions when the value didn't change
author
Benjamin Otte
<otte@redhat.com>
Thu, 18 Feb 2016 22:55:00 +0000
(23:55 +0100)
committer
Benjamin Otte
<otte@redhat.com>
Thu, 18 Feb 2016 22:57:39 +0000
(23:57 +0100)
This stops us from starting a lot of useless transitions. And it's even
conformant with the CSS spec!
gtk/gtkcssanimatedstyle.c
patch
|
blob
|
history
diff --git
a/gtk/gtkcssanimatedstyle.c
b/gtk/gtkcssanimatedstyle.c
index d13403aaa88ab602479bc0343e1d9f8a9bdda9b1..2c92fa7463a1649e49d14355d5ab9fa99dacf36b 100644
(file)
--- a/
gtk/gtkcssanimatedstyle.c
+++ b/
gtk/gtkcssanimatedstyle.c
@@
-294,6
+294,10
@@
gtk_css_animated_style_create_css_transitions (GSList *animations,
}
}
+ if (_gtk_css_value_equal (gtk_css_style_get_value (source, i),
+ gtk_css_style_get_value (base_style, i)))
+ continue;
+
animation = _gtk_css_transition_new (i,
gtk_css_style_get_value (source, i),
_gtk_css_array_value_get_nth (timing_functions, i),